package com.clk.test;

import com.clk.pojo.Hy;
import com.clk.services.HyServices;
import jdk.nashorn.internal.ir.CallNode;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import sun.awt.AppContext;

import java.util.List;

public class Hytest {
    private static HyServices hyServices;
    static {
        ApplicationContext context=new ClassPathXmlApplicationContext("application.xml");
        hyServices=context.getBean("hyServices",HyServices.class);
    }

    @Test
    public  void getAllByPage(){
        List<Hy> hyList = hyServices.getHyAllByPage(2, 1);
        for (Hy hy:hyList){
            System.out.println(hy.toString());
        }
    }

}
